# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries do
  @moduledoc """
  The historical organic crawl rate timeseries data, used for monitoring. Organic crawl is auto-determined by Google to crawl the user's website when dedicate crawl is not set. Crawl rate is the QPS of crawl request Google sends to the user's website.

  ## Attributes

  *   `googleOrganicCrawlRate` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries.t`, *default:* `nil`) - Google's organic crawl rate time series, which is the sum of all googlebots' crawl rate. Please refer to https://developers.google.com/search/docs/crawling-indexing/overview-google-crawlers for more details about googlebots.
  *   `vertexAiOrganicCrawlRate` (*type:* `GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries.t`, *default:* `nil`) - Vertex AI's organic crawl rate time series, which is the crawl rate of Google-CloudVertexBot when dedicate crawl is not set. Please refer to https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers#google-cloudvertexbot for more details about Google-CloudVertexBot.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :googleOrganicCrawlRate =>
            GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries.t()
            | nil,
          :vertexAiOrganicCrawlRate =>
            GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries.t()
            | nil
        }

  field(:googleOrganicCrawlRate,
    as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries
  )

  field(:vertexAiOrganicCrawlRate,
    as: GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaCrawlRateTimeSeries
  )
end

defimpl Poison.Decoder,
  for:
    GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries do
  def decode(value, options) do
    GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for:
    GoogleApi.DiscoveryEngine.V1.Model.GoogleCloudDiscoveryengineV1betaOrganicCrawlRateTimeSeries do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
